package cn.platform.request;

import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class CommentViewRequest extends PageAble{
    private String title;
    private String sender;
    private String senderType;
    private LocalDateTime begin;
    private LocalDateTime end;

    public void setSendTimeRange(List<String> sendTimeRange){
        try{
            this.begin = LocalDateTime.parse(sendTimeRange.get(0));
            this.end = LocalDateTime.parse(sendTimeRange.get(1));
        }
        catch (Exception e){
            this.begin = null;
            this.end = null;
        }
    }
}
